home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / include / user / vmStat.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-09  |  3.7 KB  |  111 lines

  1. /*
  2.  * vmStat.h --
  3.  *
  4.  *    The statistics structure for the vm module.
  5.  *
  6.  * Copyright (C) 1986, 1992 Regents of the University of California
  7.  * All rights reserved.
  8.  *
  9.  *
  10.  * $Header: /user5/kupfer/spriteserver/include/user/RCS/vmStat.h,v 1.11 92/07/09 15:43:33 kupfer Exp $ SPRITE (Berkeley)
  11.  */
  12.  
  13. #ifndef _VMSTAT
  14. #define _VMSTAT
  15.  
  16. #include <spriteTime.h>
  17. #ifdef SPRITED
  18. #include <vmTypes.h>
  19. #else
  20. #include <sprited/vmTypes.h>
  21. #endif
  22.  
  23. /*
  24.  * Virtual memory statistics structure.
  25.  */
  26.  
  27. typedef struct {
  28.     /* 
  29.      * Misc. stats.
  30.      */
  31.     int syncCalls;        /* number of calls to Vm_SyncAll */
  32.     int    numPhysPages;        /* number of pages in memory */
  33.  
  34.     /* 
  35.      * External pager stats.
  36.      */
  37.     /* data_request */
  38.     int pagesRead[VM_NUM_SEGMENT_TYPES]; /* pages gotten 100% from FS */
  39.     int partialPagesRead[VM_NUM_SEGMENT_TYPES];    /* pages partially from FS */
  40.     int pagesZeroed[VM_NUM_SEGMENT_TYPES]; /* pages completely zero-filled */
  41.     Time readTime[VM_NUM_SEGMENT_TYPES]; /* time spent in data_request */
  42.     Time readCopyTime[VM_NUM_SEGMENT_TYPES]; /* data_request time for 
  43.                           * segment copy */ 
  44.     /* data_return */
  45.     int returnCalls;        /* calls to data_return */
  46.     int pagesWritten[VM_NUM_SEGMENT_TYPES]; /* pages written */
  47.     int pagesCleaned[VM_NUM_SEGMENT_TYPES]; /* pages written because of 
  48.                          * Sprite cleaning request */
  49.     Time writeTime[VM_NUM_SEGMENT_TYPES]; /* time spent in data_return */
  50.     /* memory_object_init */
  51.     int initCalls;        /* calls to memory_object_init */
  52.     int forcedInits;        /* number of times segment init was forced 
  53.                  * by VmAddrRegion */
  54.     Time initTime;        /* time spent in memory_object_init */
  55.     /* memory_object_terminate */
  56.     int terminateCalls;        /* calls to memory_object_terminate */
  57.     Time terminateTime;        /* time spent in memory_object_terminate */
  58.     /* memory_object_data_unlock */
  59.     int unlockCalls;        /* calls to memory_object_data_unlock */
  60.     /* memory_object_lock_completed */
  61.     int lockCompletedCalls;    /* calls to memory_object_lock_completed */
  62.     Time lockCompletedTime;    /* time spent in lock_completed */
  63.  
  64.     /* 
  65.      * segment stats.
  66.      */
  67.     int segmentsCreated;
  68.     int segmentsDestroyed;
  69.     int segmentsNeedlesslyDestroyed;
  70.                 /* swap segments that could have been 
  71.                  * trivially reused */
  72.     int swapPagesWasted;    /* number of pages that had to be faulted 
  73.                  * in again because the heap/stack segment 
  74.                  * was destroyed at exec */
  75.     int queueOverflows;        /* num times segment had to be removed from 
  76.                  * request port set because it was getting
  77.                  * swamped by requests */
  78.     int segmentLookups;        /* num times segment was sought in main list */
  79.     int segmentsLookedAt;    /* num of segments that had to be looked at 
  80.                  * when doing lookups */ 
  81.  
  82.     /* 
  83.      * Debugging stats; liable to change.
  84.      */
  85.  
  86.     /* Stats for segment copies. */
  87.     int segmentCopies;        /* number of copies */
  88.     Time forkTime;        /* total time spent in Vm_Fork */
  89.     Time findRegionTime;    /* Vm_Fork time in vm_region */
  90.     Time segLookupTime;        /* Vm_Fork time in VmSegByName */
  91.     Time segCopyTime;        /* Vm_Fork time in VmSegmentCopy */
  92.     Time regionCopyTime;    /* Vm_Fork time in CopyRegion */
  93.     int sourceCopyRead;        /* source pages read from swap while 
  94.                  * copying segment */ 
  95.     int sourceCopyZeroed;    /* source pages zero-filled */
  96.     int targetCopyRead;        /* target pages read from swap during 
  97.                  * copy, only to be overwritten */
  98.     int targetCopyZeroed;    /* target pages zero-filled before being 
  99.                  * overwritten  */
  100.     int pagesCopied;        /* sum of page sizes copied */
  101.     int swapPagesCopied;    /* sum of page sizes of segment backing 
  102.                  * files  */
  103.     int objPagesCopied;        /* sum of page sizes of heap "init" files */
  104. } Vm_Stat;
  105.  
  106. #ifdef SPRITED
  107. extern    Vm_Stat    vmStat;
  108. #endif
  109.  
  110. #endif /* _VMSTAT */
  111.